{if !empty($cubes)}
	<div class="fui-cube">
		{if count($cubes)==1}
			<img data-lazy="{php echo tomedia($cubes[0]['img'])}" {if !empty($cubes[0]['url'])}onclick="location.href='{$cubes[0]['url']}'"{/if} />
		{/if}
			
		{if count($cubes)>1}
			<div class="fui-cube-left">
				<img data-lazy="{php echo tomedia($cubes[0]['img'])}" {if !empty($cubes[0]['url'])}onclick="location.href='{$cubes[0]['url']}'"{/if} />
			</div>
			<div class="fui-cube-right">
				{if count($cubes)==2}
					<img data-lazy="{php echo tomedia($cubes[1]['img'])}" {if !empty($cubes[1]['url'])}onclick="location.href='{$cubes[1]['url']}'"{/if} />
				{/if}
				{if count($cubes)>2}
					<div class="fui-cube-right1">
						<img data-lazy="{php echo tomedia($cubes[1]['img'])}" {if !empty($cubes[1]['url'])}onclick="location.href='{$cubes[1]['url']}'"{/if} />
					</div>
					<div class="fui-cube-right2">
						{if count($cubes)==3}
							<img data-lazy="{php echo tomedia($cubes[2]['img'])}" {if !empty($cubes[2]['url'])}onclick="location.href='{$cubes[2]['url']}'"{/if} />
						{/if}
						{if count($cubes)>3}
							<div class="left">
								<img data-lazy="{php echo tomedia($cubes[2]['img'])}" {if !empty($cubes[2]['url'])}onclick="location.href='{$cubes[2]['url']}'"{/if} />
							</div>
						{/if}
						{if count($cubes)==4}
							<div class="right">
								<img data-lazy="{php echo tomedia($cubes[3]['img'])}" {if !empty($cubes[3]['url'])}onclick="location.href='{$cubes[3]['url']}'"{/if} />
							</div>
						{/if}
					</div>
				{/if}
			</div>
		{/if}
	</div>
{/if}
